home *** CD-ROM | disk | FTP | other *** search
- Path: news.uh.edu!usenet
- From: Sensarn <txs53132@bayou.uh.edu>
- Newsgroups: comp.lang.c++
- Subject: Re: Two Stupid Newbie Questions
- Date: 19 Jan 1996 00:34:53 GMT
- Organization: AEtna Insurance Agency
- Message-ID: <4dmovd$sqb@masala.cc.uh.edu>
- References: <4d9qc7$m8t@news.fsu.edu> <DLCF5y.6It@ricks.edu>
- NNTP-Posting-Host: sip-14259.public-dialups.uh.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1 (Windows; U; 16bit)
-
- yourmail@ricks.edu (Your Name) wrote:
- >colvin@xi.cs.fsu.edu (Joshua Colvin) wrote:
- >
- >
- >
- >
- >> Howdy all! Okay...quickees here:
- >>
- >> 1) When I move an image around the screen I draw it in a position and
- >> then replace it using putimage(blah, XOR_PUT); but this creates a
- >> flickering effect. Is it becuase my computer's just too slow to make
- >> the movement appear smooth, or is there a better way to move an image
- >> around on the screen?
- >>
- >> 2) When should I use malloc() as opposed to farmalloc() ?
- >>
- >>Thanx. :)
- >>
- >>Joshua Colvin
- >>colvin@cs.fsu.edu
- >
- >Hey Joshua,
- >
- > I think you are out of luck when it comes to using putimage().
- >You might try loading the images into memory before displaying them.
- >
- > If you are using c++ I wouldn't use malloc at all. Use new()
- >instead. It is much more efficient.
- >
- >j
- >
- Make your own sprite functions. Accessing video memory is fast with
- pointers (especially when you know what the source for the functions
- are). Lots of the premade functions aren't optimized at all. As for
- farmalloc, I use it all the time (I never use malloc). This post is
- replying to Joshua.
-
-
-